<%--                                                                       --%>
<%-- Copyright (c) 2004 BroadVision, Inc.  All rights reserved.            --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean-el" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>

<script language="JavaScript">

  function checkNumberOnly(e) {
    var charCode = (navigator.appName == "Netscape") ? e.which : e.keyCode;
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
	  alert("<bean-el:message key='ep.text.cache.alert.number' bundle='ep.messages'/>");
      return false;
    }
    else {
      return true;
    }
  }
  

	function doSaveAction(theForm){
		if(validateRequiredField(theForm) == false) return false;
		return true;
	}


  function doCancelAction(theForm) {
  	if(confirm('<bean-el:message key="ep.text.cache.cancel.confirm" bundle="ep.messages"/>')){
			theForm.action='<c:url value="/ep/textCacheList.do"/>';
			theForm.submit();
			return;
	  }
	  else return false;
	}

</script>

<%--<html-el:javascript formName="epTextCacheEditForm" method="validateRequiredField"/>--%>

<html-el:form action="/ep/textCacheSave.do" focus="name" onsubmit="return doSaveAction(this);">
<html-el:hidden property="name"/>
<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
  <tr>
    <td valign="top" width="100%">
      <div class="pageTitle">	  
        <bean-el:message key="ep.text.cache.edit.title" arg0="${epTextCacheEditForm.map.name}" bundle="ep.messages"/> 
      </div>
			
      <div class="errorMessage"><html-el:errors/></div>
      <div class="pageSubtitle">
        <span class="left">
          <bean-el:message key="ep.text.cache.subtitle" bundle="ep.messages"/>
        </span>
        <span class="right">&nbsp;</span>
      </div>       
      
      <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
        <tr> 
          <td class="label">
            <bean-el:message key="ep.text.cache.edit.label.rootDir" bundle="ep.messages"/>:
          </td>
          <td class="labelField">
             <c:out value="${epTextCacheEditForm.map.rootDir}"/>
          </td>
        </tr>
        <tr> 
          <td class="label">
            <bean-el:message key="ep.text.cache.edit.label.status" bundle="ep.messages"/>:
          </td>
          <td class="labelField">
            <html-el:radio property="status" value="true"/><bean-el:message key="ep.text.cache.enabled" bundle="ep.messages"/>&nbsp;
            <html-el:radio property="status" value="false"/><bean-el:message key="ep.text.cache.disabled" bundle="ep.messages"/>
          </td>
        </tr>		
          <tr>
					<td class="label">
						<bean-el:message key="ep.text.cache.edit.label.level" bundle="ep.messages"/>:
					</td>
					<td class="labelField">
            <html-el:select property="level" size="1">
				  	  <html-el:option key="ep.text.cache.edit.label.level.inMemory" bundle="ep.messages" value="0"/>
              <html-el:option key="ep.text.cache.edit.label.level.both" bundle="ep.messages" value="1"/>
              <html-el:option key="ep.text.cache.edit.label.level.fileSystem" bundle="ep.messages" value="2"/>
            </html-el:select>
					</td>					
				</tr>											
        <tr> 
          <td class="label">
            <bean-el:message key="ep.text.cache.edit.label.size" bundle="ep.messages"/>:
          </td>
          <td class="labelField">
            <html-el:text size="5" maxlength="20" property="size" onkeypress="return checkNumberOnly(event)"/>
          </td>
        </tr>
      </table>
			
      <div class="pageButtonWrap" align="right">
        <html-el:reset styleClass="pageButton" property="resetBtn" titleKey="button.reset">
          <bean-el:message key="button.reset" bundle="ep.messages"/>
        </html-el:reset>&nbsp;
        <input type="button" name="actionCancel" class="pageButton"
          onclick="doCancelAction(this.form);"
          value='<bean-el:message key="button.cancel" bundle="ep.messages"/>'/>
        <input type="submit" name="actionSaveContinue" class="pageButton"
          value='<bean-el:message key="button.save" bundle="ep.messages"/>'/>
      </div>
	  
    </td> 
  </tr>
</table>

</html-el:form> 

